package com.cskaoyan.controller.wx.storage;

import com.cskaoyan.bean.MarketStorage;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.service.wx.storage.WxStorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: bwj
 * @Date: 2022/09/09/13:05
 * @Description:
 */
@RestController
@RequestMapping("wx/storage")
public class WxStorageController {
    @Autowired
    WxStorageService wxStorageService;

    /**
     * @Author: 宾文杰 @Description: 微信图片上传 @Date: 2022/9/9
     */
    @RequestMapping("upload")
    public BaseRespVo<MarketStorage> wxStorageUpload(MultipartFile file) throws IOException {
        MarketStorage marketStorage=wxStorageService.wxStorageUpload(file);
        return BaseRespVo.ok(marketStorage);
    }

}
